from sqlalchemy import Column, BigInteger, String, DateTime, Integer
from application.models.base import Base


class ProductCoil(Base):
    """绕组数据模型"""
    
    __tablename__ = "detection_product_coil"
    
    # 主键
    coil_id = Column(BigInteger, primary_key=True, comment="绕组ID")
    
    # 外键关联产品型号
    product_model_id = Column(BigInteger, comment="产品型号ID")
    
    # 绕组信息
    coil = Column(String(32), comment="绕组")
    coil_type = Column(String(1), comment="绕组相位")
    current_accuracy_level = Column(String(1), comment="电流准确级")
    one_current = Column(String(10), comment="一次电流")
    two_current = Column(String(10), comment="二次电流")
    current_full_load = Column(String(10), comment="电流满载")
    current_light_load = Column(String(10), comment="电流轻载")
    current_full_point = Column(String(10), comment="电流满载测点")
    current_light_point = Column(String(10), comment="电流轻载测点")
    voltage_point = Column(String(10), comment="电压测点")
    voltage_accuracy_level = Column(String(1), comment="电压准确级")
    one_voltage = Column(String(10), comment="一次电压")
    two_voltage = Column(String(10), comment="二次电压")
    voltage_full_load = Column(String(10), comment="电压满载")
    voltage_light_load = Column(String(10), comment="电压轻载")
    voltage_full_point = Column(String(10), comment="电压满载测点")
    voltage_light_point = Column(String(10), comment="电压轻载测点")
    current_point = Column(String(10), comment="电流测点")
    
    
    # 表注释
    __table_args__ = {"comment": "绕组表"}